package org.jeecg.common.util;

import org.apache.commons.lang3.StringUtils;

public class ConfigWrap {

    public static String getStringValue(String key) {
        try {
            return StringUtils.trim(SpringContextUtils.getApplicationContext().getEnvironment().getProperty(key));
        } catch (Exception var2) {
            return "";
        }
    }

    public static String getStringValue(String key, String defaultValue) {
        try {
            String value = StringUtils.trim(SpringContextUtils.getApplicationContext().getEnvironment().getProperty(key));
            return StringUtils.isNotBlank(value) ? value : defaultValue;
        } catch (Exception var3) {
            return "";
        }
    }

    public static Integer getIntegerValue(String key) {
        String value = getStringValue(key);
        return StringUtils.isBlank(value) ? null : Integer.parseInt(value);
    }
}
